package com.cy.detectsys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 *
 * @TableName data_center_info
 */
@TableName(value ="data_center_info")
@Data
public class DataCenterInfo implements Serializable {
    /**
     * 数据中心名
     */
    @TableId
    private String dataCenterName;

    /**
     * 国家
     */
    private String country;

    /**
     * 可用区域
     */
    private String availableAreas;

    /**
     * 州/省
     */
    private String location;

    /**
     * 可用于
     */
    private String useAge;

    /**
     * 云类型（公有云、政府云...）
     */
    private String type;

    /**
     * 所属地区缩写
     */
    private String locationAbbreviate;

    /**
     *
     */
    private String locationFullNameEn;

    /**
     * 经度
     */
    private Double longitude;

    /**
     * 纬度
     */
    private Double latitude;

    /**
     * 开放年份
     */
    private String yearOpened;

    private Integer assetCount;

    private Integer ipCount;


    private Long cloudServerCount;

    private String ipScale;

    private String portSort;

    private String protocolSort;

    private String severSort;

    private String ipSort;

    private String cloudConponentSort;
    private String webFrameSort;
    private String webAppSort;
    private String cloudServerSort;



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 数据中心名
     */
    public String getDataCenterName() {
        return dataCenterName;
    }

    /**
     * 数据中心名
     */
    public void setDataCenterName(String dataCenterName) {
        this.dataCenterName = dataCenterName;
    }

    /**
     * 国家
     */
    public String getCountry() {
        return country;
    }

    /**
     * 国家
     */
    public void setCountry(String country) {
        this.country = country;
    }

    /**
     * 可用区域
     */
    public String getAvailableAreas() {
        return availableAreas;
    }

    /**
     * 可用区域
     */
    public void setAvailableAreas(String availableAreas) {
        this.availableAreas = availableAreas;
    }

    /**
     * 州/省
     */
    public String getLocation() {
        return location;
    }

    /**
     * 州/省
     */
    public void setLocation(String location) {
        this.location = location;
    }

    /**
     * 可用于
     */
    public String getUseAge() {
        return useAge;
    }

    /**
     * 可用于
     */
    public void setUseAge(String useAge) {
        this.useAge = useAge;
    }

    /**
     * 云类型（公有云、政府云...）
     */
    public String getType() {
        return type;
    }

    /**
     * 云类型（公有云、政府云...）
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 所属地区缩写
     */
    public String getLocationAbbreviate() {
        return locationAbbreviate;
    }

    /**
     * 所属地区缩写
     */
    public void setLocationAbbreviate(String locationAbbreviate) {
        this.locationAbbreviate = locationAbbreviate;
    }

    /**
     *
     */
    public String getLocationFullNameEn() {
        return locationFullNameEn;
    }

    /**
     *
     */
    public void setLocationFullNameEn(String locationFullNameEn) {
        this.locationFullNameEn = locationFullNameEn;
    }

    /**
     * 开放年份
     */
    public String getYearOpened() {
        return yearOpened;
    }

    /**
     * 开放年份
     */
    public void setYearOpened(String yearOpened) {
        this.yearOpened = yearOpened;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DataCenterInfo other = (DataCenterInfo) that;
        return (this.getDataCenterName() == null ? other.getDataCenterName() == null : this.getDataCenterName().equals(other.getDataCenterName()))
            && (this.getCountry() == null ? other.getCountry() == null : this.getCountry().equals(other.getCountry()))
            && (this.getAvailableAreas() == null ? other.getAvailableAreas() == null : this.getAvailableAreas().equals(other.getAvailableAreas()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()))
            && (this.getUseAge() == null ? other.getUseAge() == null : this.getUseAge().equals(other.getUseAge()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getLocationAbbreviate() == null ? other.getLocationAbbreviate() == null : this.getLocationAbbreviate().equals(other.getLocationAbbreviate()))
            && (this.getLocationFullNameEn() == null ? other.getLocationFullNameEn() == null : this.getLocationFullNameEn().equals(other.getLocationFullNameEn()))
            && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
            && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
            && (this.getYearOpened() == null ? other.getYearOpened() == null : this.getYearOpened().equals(other.getYearOpened()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDataCenterName() == null) ? 0 : getDataCenterName().hashCode());
        result = prime * result + ((getCountry() == null) ? 0 : getCountry().hashCode());
        result = prime * result + ((getAvailableAreas() == null) ? 0 : getAvailableAreas().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        result = prime * result + ((getUseAge() == null) ? 0 : getUseAge().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getLocationAbbreviate() == null) ? 0 : getLocationAbbreviate().hashCode());
        result = prime * result + ((getLocationFullNameEn() == null) ? 0 : getLocationFullNameEn().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        result = prime * result + ((getYearOpened() == null) ? 0 : getYearOpened().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", dataCenterName=").append(dataCenterName);
        sb.append(", country=").append(country);
        sb.append(", availableAreas=").append(availableAreas);
        sb.append(", location=").append(location);
        sb.append(", useAge=").append(useAge);
        sb.append(", type=").append(type);
        sb.append(", locationAbbreviate=").append(locationAbbreviate);
        sb.append(", locationFullNameEn=").append(locationFullNameEn);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", yearOpened=").append(yearOpened);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
